home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Developer Toolbox 6.1
/
SGI Developer Toolbox 6.1 - Disc 4.iso
/
src
/
swtools
/
trubasic
/
rolldemos
/
chooser
/
sgchooser.tru
< prev
next >
Wrap
Text File
|
1994-08-02
|
3KB
|
130 lines
! driver for Demo Chooser program
! our excuse for not commenting this code is the 150 line limit
! imposed by the Demo version
dim pts(9,4),txt$(9)
PUBLIC d3pts(4,4),d3txt$(4)
PUBLIC tbpts(7,4),tbtxt$(7)
PUBLIC scipts(5,4),scitxt$(5)
PUBLIC intpts(6,4),inttxt$(6)
PUBLIC fontpts(2,4),fonttxt$(2)
PUBLIC rgbpts(3,4),rgbtxt$(3)
PUBLIC ippts(4,4),iptxt$(4)
library "ipmenu.tru","rgbmenu.tru","fontmenu.tru","setup.tru"
library "tbmenu.tru","intmenu.tru","3dmenu.tru","util.tru","scimenu.tru"
print
print "Setting up demos.."
print
call tw_wset_size(0,684,684)
let binc=.15
let xspace=.2
let xoff=.075
let yoff=.15
let u=ubound(pts,1)
for i=1 to u
let pts(i,1)=xoff
let pts(i,2)=pts(i,1)+binc
let pts(i,3)=yoff
let pts(i,4)=pts(i,3)+binc
let xoff=xoff+binc+xspace
if i=3 or i=6 then
let yoff=yoff+.3
let xoff=.075
end if
next i
let txt$(1)="RGB Demos"
let txt$(2)="Image Process"
let txt$(3)="Licensing True BASIC"
let txt$(4)="3D Demos"
let txt$(5)="Scientific Demos"
let txt$(6)="Interactive Demos"
let txt$(7)="About True BASIC"
let txt$(8)="Standard Demos"
let txt$(9)="Font Demo"
let r=setfontstyle("Bold")
let r=setfontsize(9)
set text justify "center","bottom"
call setup
clear
call drawbox
do
call getclick(op)
if op=1 then
call rgb_demos
call drawbox
call waitup
else if op=2 then
call ip_demos
call drawbox
call waitup
else if op=3 then
chain "!cd ../demos;../basic/tru -i closeTBI.tru &", return
else if op=4 then
call d3_demos
call drawbox
call waitup
else if op=5 then
call sci_demos
call drawbox
call waitup
else if op=6 then
call int_demos
call drawbox
call waitup
else if op=7 then
chain "!cd ../demos;../basic/tru -i aboutTBI.tru &", return
else if op=8 then
call tb_demos
call drawbox
call waitup
else if op=9 then
call font_demos
call drawbox
call waitup
end if
if op=3 or op=7 then
call expand(pts(op,1),pts(op,2),pts(op,3),pts(op,4))
draw textbox(pts(op,1),pts(op,2),pts(op,3),pts(op,4),txt$(op))
call waitup
pause 3
call unexpand(pts(op,1),pts(op,2),pts(op,3),pts(op,4))
draw textbox(pts(op,1),pts(op,2),pts(op,3),pts(op,4),txt$(op))
end if
if refresh(1)=1 then call drawbox
loop
sub drawbox
let u=ubound(pts,1)
clear
for i=1 to u
draw orgbox(i)
next i
end sub
sub getclick(op)
get mouse x,y,state
let op=0
if state<>0 then
let u=ubound(pts,1)
for i=1 to u
if x>pts(i,1) and x<pts(i,2) and y>pts(i,3) and y<pts(i,4) then
let op=i
exit sub
end if
next i
end if
end sub
picture orgbox(op)
draw box(pts(op,1),pts(op,2),pts(op,3),pts(op,4),op)
draw textbox(pts(op,1),pts(op,2),pts(op,3),pts(op,4),txt$(op))
end picture
end